cairo_region_copy(NULL) will effectively return an empty region, as this
function is always meant to return valid memory. This however inverts the
meaning of the NULL region and results in entirely non-clickable windows.
return;
g_clear_pointer (&impl->input_region, cairo_region_destroy);
- impl->input_region = cairo_region_copy (shape_region);
- cairo_region_translate (impl->input_region, offset_x, offset_y);
+
+ if (shape_region)
+ {
+ impl->input_region = cairo_region_copy (shape_region);
+ cairo_region_translate (impl->input_region, offset_x, offset_y);
+ }
+
gdk_wayland_window_sync_input_region (window);
}